<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>箭头函数</title>
</head>
<body>
    <button onclick="show()">打印</button>
    <script>
        const person = {
            username: '小红',
            age: 19,
            sayHello: function (){
                setTimeout(() => {
                    console.log(this)
                    console.log(`我叫 ${this.username} 年龄: ${this.age} 岁`)
                },1000)
            }
        }

        function show(){
            person.sayHello()
        }
    </script>
</body>
</html>